package com.leyou.common.pojo;


import java.util.List;
import java.util.Map;

/**
 * 分页结果工具类-拿PageInfo的数据，不做分页处理
 *
 * @author 冯金平
 * @date 2022/08/03
 */
public class PageResult<T> {
    private Long total;// 总条数
    private Integer totalPage;// 总页数
    private List<T> items;// 当前页数据


    //    当作为分页对象传递给前台时明月构造方法无法解析-报错
    public PageResult() {
    }


    public PageResult(Long total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    //在处理过程中可以接受某词条查询的分页结果
    public PageResult(Long total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }


}
